var os = function() {
    var ua = navigator.userAgent.toLowerCase(),

        isWindowsPhone = /(?:windows phone)/.test(ua),

        isSymbian = /(?:symbianos)/.test(ua) || isWindowsPhone,

        isAndroid = /(?:android)/.test(ua),

        isFireFox = /(?:firefox)/.test(ua),

        isChrome = /(?:chrome|crios)/.test(ua),

        isTablet = /(?:ipad|playbook)/.test(ua) || (isAndroid && !/(?:mobile)/.test(ua)) || (isFireFox && /(?:tablet)/.test(ua)),

        isPhone = /(?:iphone)/.test(ua) && !isTablet,

        isPc = !isPhone && !isAndroid && !isSymbian,

        isWxWork = ua.match(/micromessenger/i) == "micromessenger" &&
        ua.match(/wxwork/i) == "wxwork",
        isWx = ua.match(/micromessenger/i) == "micromessenger";

    return {
        isTablet: isTablet,

        isPhone: isPhone,

        isAndroid: isAndroid,

        isPc: isPc,

        isChrome: isChrome,

        isWxWork: isWxWork,

        isWx: isWx
    };
};
export default os;